package com.lzy.product.apis;

import com.lzy.product.dtos.agent.AgentProtocolCommissionDto;

import java.util.List;

/**
 * 协议销售分佣
 * Created by WIN7 on 2018/04/14.
 */
public interface AgentProtocolCommissionServiceApi extends BaseServiceApi<AgentProtocolCommissionDto> {

    /**
     * 根据id查询分佣
     *
     * @param protocolId
     * @return
     */
    List<AgentProtocolCommissionDto> selectByProtocolId(Long protocolId);

    /**
     * 删除销售分佣
     *
     * @param protocolId
     * @return
     */
    Boolean deleteByProtocolId(Long protocolId);

    /**
     * 根据协议id与体系id查询分佣
     *
     * @param protocolId
     * @param systemId
     * @param isFirst 此参数不为null时将作为type条件
     * @return
     */
    List<AgentProtocolCommissionDto> selectByProtocolIdAndSystemId(Long protocolId, Long systemId, Integer isFirst);

    /**
     * 根据协议id与体系id与协议升级id查询分佣
     *
     * @param protocolId
     * @param systemId
     * @return
     */
    AgentProtocolCommissionDto selectByProtocolIdAndSystemIdAndPromoteId(Long protocolId, Long systemId, Long PromoteId);

}
